/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class PharmacystockPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "pharmacyId")
    private int pharmacyId;
    @Basic(optional = false)
    @Column(name = "stockId")
    private int stockId;

    public PharmacystockPK() {
    }

    public PharmacystockPK(int pharmacyId, int stockId) {
        this.pharmacyId = pharmacyId;
        this.stockId = stockId;
    }

    public int getPharmacyId() {
        return pharmacyId;
    }

    public void setPharmacyId(int pharmacyId) {
        this.pharmacyId = pharmacyId;
    }

    public int getStockId() {
        return stockId;
    }

    public void setStockId(int stockId) {
        this.stockId = stockId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) pharmacyId;
        hash += (int) stockId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PharmacystockPK)) {
            return false;
        }
        PharmacystockPK other = (PharmacystockPK) object;
        if (this.pharmacyId != other.pharmacyId) {
            return false;
        }
        if (this.stockId != other.stockId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.PharmacystockPK[ pharmacyId=" + pharmacyId + ", stockId=" + stockId + " ]";
    }
    
}
